package ZUOYE0417;

import java.util.Scanner;

public class 作业八 {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		System.out.print("请输入消费金额：");
		double money = in.nextDouble();
		if (money < 50) {
			System.out.println("您无法参与本次活动。");
		} else {
			System.out.println("是否参加优惠换购活动：");
			System.out.println("1:满50元，加2元换购百事可乐饮料1瓶");
			System.out.println("2.满100元，加3元换购500ml可乐一瓶");
			System.out.println("3.满100元，加10元换购5公斤面粉");
			System.out.println("4.满200元，加10元可换购1个苏泊尔炒菜锅");
			System.out.println("5.满200元，加20元可换购欧雷雅爽肤水一瓶");
			System.out.println("0.不换购");
			System.out.print("请选择：");
			int a = in.nextInt();
			switch (a) {
			case 0: {
				System.out.println("不愿意换购");
				break;
			}
			case 1: {
				money = money + 2;
				System.out.println("本次消费金额为：" + money);
				System.out.println("成功换购：百事可乐1瓶");
				break;
			}
			case 2: {
				if (money < 100) {
					System.out.println("无法换购");
				} else {
					money = money + 3;
					System.out.println("本次消费金额为：" + money);
					System.out.println("成功换购：500ml可乐一瓶");
				}
				break;
			}
			case 3: {
				if (money < 100) {
					System.out.println("无法换购");
				} else {
					money = money + 10;
					System.out.println("本次消费金额为：" + money);
					System.out.println("成功换购：5公斤面粉");
				}
				break;
			}
			case 4: {
				if (money < 200) {
					System.out.println("无法换购");
				} else {
					money = money + 10;
					System.out.println("本次消费金额为：" + money);
					System.out.println("成功换购：1个苏泊尔炒菜锅");
				}
				break;
			}
			case 5: {
				if (money < 200) {
					System.out.println("无法换购");
				} else {
					money = money + 20;
					System.out.println("本次消费金额为：" + money);
					System.out.println("成功换购：欧雷雅爽肤水一瓶");
				}
				break;
			}
			}
		}
	}
}
